<template>
  <div class="dashboard-editor-container">
    <el-card shadow="always" :body-style="{ padding: '20px' }">
      <panel-group :results="results" />
    </el-card>
  </div>
</template>

<script>
import PanelGroup from './components/PanelGroup'
import { getIndex } from '@/api/index'

export default {
  // name: 'Dashboard',
  components: {
    PanelGroup
  },
  data() {
    return {
      results: {}
    }
  },
  created() {
    this.getIndexData()
  },
  methods: {
    getIndexData() {
      getIndex().then((response) => {
        this.results = response
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard-editor-container {
  padding: 32px;
  background-color: rgb(240, 242, 245);
  position: relative;

  .chart-wrapper {
    background: #fff;
    padding: 16px 16px 0;
    margin-bottom: 32px;
  }
}

@media (max-width: 1024px) {
  .chart-wrapper {
    padding: 8px;
  }
}
</style>
<style>
.tip_box > div:nth-child(2n-1) .el-icon-info{
  color: #F56C6C;
}
.tip_box > div:nth-child(2n) .el-icon-info{
  color: #E6A23C;
}
</style>
